const { ipcMain, app, BrowserWindow, Tray, Menu } = require('electron');
const path = require('path');

function AboutWindow(debug = false) {
    // 打开设置窗口
    var aboutWindow;
    this.createWindow = function() {
        aboutWindow = new BrowserWindow({
            width: 600,
            height: 400,
            webPreferences: {
                nodeIntegration: true,
                defaultFontFamily: {
                    standard:"WenQuanYi Micro Hei",
                }
            },
            //frame: false,
            resizable: false,
        });
        aboutWindow.loadURL(path.join(__dirname, '../html/about.html'));
        if (debug) {
            aboutWindow.webContents.openDevTools();
            aboutWindow.maximize();
        }
        aboutWindow.on('closed', function () {
            aboutWindow = null;
        });
        return aboutWindow;
    };
}
module.exports = AboutWindow;